package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cloudkinto.enumType.order.shelf.OrderInputShelfStatusEnum;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 入库产品上架表（中间表）
 * </p>
 *
 * @author long
 * @since 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order_input_shelf")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderInputShelfDo extends Model<OrderInputShelfDo> {

    private static final long serialVersionUID = 1L;

    /**
     * 上架id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 客户id
     */
    @TableField("company_id")
    private Long companyId;

    private Long whId;

    /**
     * 上架单号
     */
    @TableField("pas_no")
    private String pasNo;

    /**
     * 入库单号
     */
    @TableField("inbound_source_no")
    private String inboundSourceNo;

    /**
     * 入库类型
     */
    @TableField("inbound_type")
    private Integer inboundType;

    /**
     * 状态 {@link OrderInputShelfStatusEnum}
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 上架时间
     */
    @TableField("pas_time")
    private Date pasTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
